public class DisplayBin {

	
	public static void main(String[] args) {
		
		int x = 882;
		displayBin(x);
	

	}
	
	
	public static void displayBin(int input)
	{
		if (input!=0) // recursive case
		{
			displayBin(input/3);
			System.out.print(input%3);
		}		
	}
}